﻿using suirui.ZhuMu.Model;
using suirui.ZhuMu.Entity;
//using suirui.ZhuMu.Entity.Entities;
using System;
using System.Threading.Tasks;
using suirui.ZhuMu.Repositories;
using System.Collections.Generic;
using suirui.ZhuMu.Common.Helper;

namespace suirui.ZhuMu.Services
{
    public static class OperateResult
    {
        #region MyRegion

        public static APIResult<T> QuerySuccessInfo<T>(T user)
        {
            return new APIResult<T>() { Data = user, Code = (int)PublicErrorCode.Success, Message = "获取信息成功！" };
        }

        public static APIResult<T> QueryFailInfo<T>()
        {
            return new APIResult<T>() { Code = ErrorCode.UserUpdateFail, Message = "获取信息失败！" };
        }

        public static APIResult<T> OperateSuccessInfo<T>(T user)
        {
            return new APIResult<T>() { Data = user, Code = (int)PublicErrorCode.Success, Message = "操作信息成功！" };
        }

        public static APIResult<T> OperateFailInfo<T>()
        {
            return new APIResult<T>() { Code = ErrorCode.UserUpdateFail, Message = "操作信息失败！" };
        }

        #endregion
    }
}
